<template>
  <a-card :bordered="false" :bodyStyle="{ padding: '4px 12px' }" class="ax_plain_card">
    <a-flex justify="space-between" :align="'center'">
      <div>
        <span>已选:</span>
        <span>（{{ deptTable.keys.length }}）</span>
      </div>
      <a-pagination
        :total="deptTable.query.total"
        :current="deptTable.query.pageNum"
        :page-size="deptTable.query.pageSize"
        show-size-changer
        @change="pageChange"
        show-quick-jumper
        show-less-items
      ></a-pagination>
    </a-flex>
  </a-card>
</template>

<script setup lang="ts">
import { deptList } from '../../data/curd';
import { deptTable } from '../../data/table';

const pageChange = (page: number, pageSize: number) => {
  deptTable.value.query.pageNum = page;
  deptTable.value.query.pageSize = pageSize;
  deptList();
};
</script>

<style lang="scss" scoped></style>
